home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / appkit.160 < prev    next >
Text File  |  1992-02-06  |  1KB  |  32 lines

  1. {\rtf0\ansi{\fonttbl\f2\fnil Times-Roman;\f0\fmodern Courier;}
  2. \paperw11760
  3. \paperh7200
  4. \margl120
  5. \margr120
  6. \pard\tx1152\tx2304\tx3456\tx4608\tx5760\tx6912\tx8064\tx9216\tx10368\tx11520\f2\b0\i0\ul0\fs28 view scroll scrollview appkit clip \
  7. \
  8. Q:  It seems like the scrollView ignores the frame.origin of its docView.  Also, does a ScrollView clip to its update rect(s)?\
  9. \
  10. A:  A ScrollView translates the coordinate system of its contentView in response to user movement of the scrollers.  Since the frame of the docView is defined in the coordinate system of the contentView (i.e. it's a subview of the contentView), translating the coordinate system of the contentView has the effect of moving the frame, and hence the visible portion of the docView.\
  11. \
  12. When you do a 
  13. \b setDocView
  14. \b0 : the system translates the coordinate system of the contentView so that the contentView's bounds.origin is the same as the frame.origin of the docView.  For example: if the frame.origin of your docView is \{100.0,100.0\}, the bounds.origin of the contentView will be \{100.0,100.0\} as well.  \
  15. \
  16. So the ScrollView does pay attention to what the frame.origin of the docView is, but it doesn't really matter what it is, at least initially.\
  17. \
  18. No, the drawing is not clipped to the update rects; however, you can restrict the area being redrawn yourself by using 
  19. \b PSrectclip
  20. \b0 () or 
  21. \b NXRectClip
  22. \b0 () in your 
  23. \b drawSelf
  24. \b0 :: method.\
  25. \
  26. QA160\
  27. \
  28. Valid for 1.0\
  29. Valid for 2.0\
  30. \
  31.  
  32.